<html>
<head>
<title>
RemoteContent - Helma Javascript Reference
</title>

<meta http-equiv="Content-Script-Type" content="text/javascript">
<script src="scripts.js"></script>
<link rel="stylesheet" href="styles.css" media="screen" />
    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>
    <script type="text/javascript">_uacct = "UA-737027-2";urchinTracker();</script>
<style>
td {
    font-family: "Trebuchet MS", sans-serif; 
    font-size: 13px; 
    line-height:135%;
}
.columnheight {
    height: 1350px;
}
</style>
</head>
<body bgcolor="white">

<div class="frame">

<img class="home" onclick="location='http://dev.helma.org/'" src="helmaheader.gif" /><br />
<div class="lead">
    <p>Detailed reference of prototypes, properties and methods available in the <br />
    Javascript environment of your Helma web applications.</p>
</div>

<script> openbox('content') </script>


    <div class="content">
        <div class="docs">
        
            <!--
            <div class="sectionHead">Library: RemoteContent.js</div>
            -->
            <div class="section overview">
            <!--
                <div class="itemTitle">
                    Overview
                </div>
            -->
                <div>   
                    <div class="desc">Fields and methods of the jala.RemoteContent class.</div>
                    <div class="itemTags">
            <!--
                    <ul>
                        
                    
                    </ul>
            -->
                    </div>
                </div>
            </div>
            
            <!--
            <div class="sectionHead">Constructors</div>
            -->
            
            
            <div class="section constructor">
                <div class="itemTitle">
                    <a name="jala.RemoteContent"></a>
                    
                    
                        <i><a href="#jala" class="type">jala</a>
                        <span class="symbolname">RemoteContent</span>(<span class="signature">url, method, storage</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Construct a new remote content handler.</div>
                
                
                
                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            url
                        </td>
                        <td>
                            The URL string of the remote site.
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            Integer
                        </td>
                        <td>
                            method
                        </td>
                        <td>
                            The method to retrieve the remote content.
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            File
                        </td>
                        <td>
                            storage
                        </td>
                        <td>
                            The cache directory.
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">methods</div>
                
                    <ul class="details">
                        <li><a href="#jala.RemoteContent.setInterval">setInterval</a>(interval)</li>
                    </ul>
                
                    <ul class="details">
                        <li><a href="#jala.RemoteContent.get">get</a>(key)</li>
                    </ul>
                
                    <ul class="details">
                        <li><a href="#jala.RemoteContent.getKeys">getKeys</a>()</li>
                    </ul>
                
                    <ul class="details">
                        <li><a href="#jala.RemoteContent.needsUpdate">needsUpdate</a>()</li>
                    </ul>
                
                    <ul class="details">
                        <li><a href="#jala.RemoteContent.update">update</a>()</li>
                    </ul>
                
                    <ul class="details">
                        <li><a href="#jala.RemoteContent.clear">clear</a>()</li>
                    </ul>
                
                    <ul class="details">
                        <li><a href="#jala.RemoteContent.toString">toString</a>()</li>
                    </ul>
                
                    <ul class="details">
                        <li><a href="#jala.RemoteContent.valueOf">valueOf</a>()</li>
                    </ul>
                
                
                
                
                
                
                    <div class="detailHead">inherits</div>
                    
                        <div>setProxy(<span class="signature">proxyString</span>) from helma.Http</div>
                    
                        <div>getProxy(<span class="signature"></span>) from helma.Http</div>
                    
                        <div>setCredentials(<span class="signature">username, password</span>) from helma.Http</div>
                    
                        <div>setContent(<span class="signature">stringOrObject</span>) from helma.Http</div>
                    
                        <div>setMethod(<span class="signature">m</span>) from helma.Http</div>
                    
                        <div>getMethod(<span class="signature"></span>) from helma.Http</div>
                    
                        <div>setHeader(<span class="signature">name, value</span>) from helma.Http</div>
                    
                        <div>getHeader(<span class="signature">name</span>) from helma.Http</div>
                    
                        <div>setCookie(<span class="signature">name, value</span>) from helma.Http</div>
                    
                        <div>getCookie(<span class="signature">name</span>) from helma.Http</div>
                    
                        <div>setCookies(<span class="signature">cookies</span>) from helma.Http</div>
                    
                        <div>getCookies(<span class="signature"></span>) from helma.Http</div>
                    
                        <div>setTimeout(<span class="signature">timeout</span>) from helma.Http</div>
                    
                        <div>setReadTimeout(<span class="signature">timeout</span>) from helma.Http</div>
                    
                        <div>getTimeout(<span class="signature"></span>) from helma.Http</div>
                    
                        <div>getReadTimeout(<span class="signature"></span>) from helma.Http</div>
                    
                        <div>setFollowRedirects(<span class="signature">value</span>) from helma.Http</div>
                    
                        <div>getFollowRedirects(<span class="signature"></span>) from helma.Http</div>
                    
                        <div>setUserAgent(<span class="signature">agent</span>) from helma.Http</div>
                    
                        <div>getUserAgent(<span class="signature"></span>) from helma.Http</div>
                    
                        <div>setBinaryMode(<span class="signature">mode</span>) from helma.Http</div>
                    
                        <div>getBinaryMode(<span class="signature"></span>) from helma.Http</div>
                    
                        <div>setMaxResponseSize(<span class="signature">Size</span>) from helma.Http</div>
                    
                        <div>getMaxResponseSize(<span class="signature"></span>) from helma.Http</div>
                    
                        <div>setResponseHandler(<span class="signature">Response</span>) from helma.Http</div>
                    
                        <div>getResponseHandler(<span class="signature"></span>) from helma.Http</div>
                    
                        <div>getUrl(<span class="signature">url, opt</span>) from helma.Http</div>
                    
                
                
                

                

            </div>
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <!--
            <div class="sectionHead">Namespaces</div>
            -->
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <!--
            <div class="sectionHead">Properties</div>
            -->
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.HTTP"></a>
                    
                    <span class="type">int</span>
                    
                    
                    
                        <i><a href="#jala" class="type">jala</a>.
                        <span class="symbolname">RemoteContent.HTTP</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">A constant representing the HTTP retrieval method.</div>
                
                
                
                
                
                
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.XMLRPC"></a>
                    
                    <span class="type">int</span>
                    
                    
                    
                        <i><a href="#jala" class="type">jala</a>.
                        <span class="symbolname">RemoteContent.XMLRPC</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">A constant representing the XML-RPC retrieval method.</div>
                
                
                
                
                
                
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.SUFFIX"></a>
                    
                    <span class="type">String</span>
                    
                    
                    
                        <i><a href="#jala" class="type">jala</a>.
                        <span class="symbolname">RemoteContent.SUFFIX</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">The default name of the cache directory.</div>
                
                
                
                
                
                
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            <div class="section object">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.CACHEDIR"></a>
                    
                    <span class="type">File</span>
                    
                    
                    
                        <i><a href="#jala" class="type">jala</a>.
                        <span class="symbolname">RemoteContent.CACHEDIR</span></i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">The default cache directory.</div>
                
                
                
                
                
                
                

                <!-- if test="symbol.properties.length">
                <div class="detailHead">properties</div>
                <table class="params">
                
                </table>
                </if -->
            </div>
            
            
            
            
            
            
            
            
            
            
            
            

            <!--
            <div class="sectionHead">Constructors</div>
            -->
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            
            <div class="sectionHead">Methods</div>
            
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.setInterval"></a>
                    
                    
                        <i><a href="#jala.RemoteContent" class="type">jala.RemoteContent</a>.
                        <span class="symbolname">setInterval</span>(<span class="signature">interval</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Set the interval the remote content's
cache is bound to be updated.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            Number
                        </td>
                        <td>
                            interval
                        </td>
                        <td>
                            The interval value in milliseconds.
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.get"></a>
                    
                    
                        <i><a href="#jala.RemoteContent" class="type">jala.RemoteContent</a>.
                        <span class="symbolname">get</span>(<span class="signature">key</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Get an arbitrary property of the remote content.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            String
                        </td>
                        <td>
                            key
                        </td>
                        <td>
                            The name of the property.
                        </td> 
                    </tr>
                
                </table>
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            The value of the property.
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.getKeys"></a>
                    
                    
                        <i><a href="#jala.RemoteContent" class="type">jala.RemoteContent</a>.
                        <span class="symbolname">getKeys</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Get all available property names.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            The list of property names.
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.needsUpdate"></a>
                    
                    
                        <i><a href="#jala.RemoteContent" class="type">jala.RemoteContent</a>.
                        <span class="symbolname">needsUpdate</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Tests whether the remote content needs to be updated.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            True if the remote content needs to be updated.
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.update"></a>
                    
                    
                        <i><a href="#jala.RemoteContent" class="type">jala.RemoteContent</a>.
                        <span class="symbolname">update</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Get the updated and cached remote content.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            The content as retrieved from the remote site.
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.clear"></a>
                    
                    
                        <i><a href="#jala.RemoteContent" class="type">jala.RemoteContent</a>.
                        <span class="symbolname">clear</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Flushes (empties) the cached remote content.</div>
                

                
                
                
                
                
                
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.toString"></a>
                    
                    
                        <i><a href="#jala.RemoteContent" class="type">jala.RemoteContent</a>.
                        <span class="symbolname">toString</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Get a string representation of the remote content.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            The remote content as string.
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.valueOf"></a>
                    
                    
                        <i><a href="#jala.RemoteContent" class="type">jala.RemoteContent</a>.
                        <span class="symbolname">valueOf</span>(<span class="signature"></span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Get the value of the remote content.</div>
                

                
                
                
                
                
                
                
                <div class="detailHead">returns</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            
                        </td>
                        <td>
                            The remote content including response header data.
                        </td> 
                    </tr>
                
                </table>
                
                
                

                

            </div>
            
            
            
            
            
            
            
            
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.flush"></a>
                    
                    
                        <i><a href="#jala" class="type">jala</a>.
                        <span class="symbolname">RemoteContent.flush</span>(<span class="signature">cache</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Remove all remote content from a file-based cache.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            File
                        </td>
                        <td>
                            cache
                        </td>
                        <td>
                            An optional target directory.
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.forEach"></a>
                    
                    
                        <i><a href="#jala" class="type">jala</a>.
                        <span class="symbolname">RemoteContent.forEach</span>(<span class="signature">callback, cache</span>)</i>
                    
                    
                    
                </div>
                
                
                    <div class="desc">Apply a custom method on all remote content in a file-based cache.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            Function
                        </td>
                        <td>
                            callback
                        </td>
                        <td>
                            The callback method to be executed
for each remote content file.
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            File
                        </td>
                        <td>
                            cache
                        </td>
                        <td>
                            An optional target directory.
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                

            </div>
            
            
            
            <div class="section function">
                <div class="itemTitle">
                    <a name="jala.RemoteContent.exec"></a>
                    <span class="deprecated"><del>
                    
                        <i><a href="#jala" class="type">jala</a>.
                        <span class="symbolname">RemoteContent.exec</span>(<span class="signature">callback, cache</span>)</i>
                    
                    
                    </del>&nbsp;&nbsp;deprecated Use {@link #forEach} instead.</span>
                </div>
                
                
                    <div class="desc">Apply a custom method on all remote content in a file-based cache.</div>
                

                
                
                
                
                
                <div class="detailHead">parameters</div>
                <table class="params">
                
                    <tr>
                        <td class="type">
                            Function
                        </td>
                        <td>
                            callback
                        </td>
                        <td>
                            The callback method to be executed
for each remote content file.
                        </td> 
                    </tr>
                
                    <tr>
                        <td class="type">
                            File
                        </td>
                        <td>
                            cache
                        </td>
                        <td>
                            An optional target directory.
                        </td> 
                    </tr>
                
                </table>
                
                
                
                
                

                

            </div>
            
            
            
        </div>
    </div>
    <div class="finePrint">
    Fri, 05 Feb 2010 17:40:07 GMT.
    </div>

<script> closebox() </script>

<script> openbox('pageintro') </script>

    <h3>core framework</h3>
        <ul>            
            <li><a href="global.html">global</a></li>
            <li><a href="app.html">app (application)</a></li>
            <li><a href="req.html">req (request)</a></li>
            <li><a href="res.html">res (response)</a></li>
            <li><a href="session.html">session</a></li>
            <li><a href="global.html#path">path</a></li>
            <li><a href="global.html#root">root</a></li>
            <li><a href="HopObject.html">HopObject</a></li>
            <li><a href="User.html">User</a></li>
            <li><a href="File.html">File</a></li>
            <li><a href="FtpClient.html">FtpClient</a></li>
            <li><a href="Image.html">Image</a></li>
            <li><a href="Mail.html">Mail</a></li>
            <li><a href="global.html#Remote">Remote</a></li>
            <li><a href="Xml.html">Xml</a></li>
            <li><a href="DatabaseObject.html">DatabaseObject</a></li>
            <li><a href="MimePart.html">MimePart</a></li>
            <li><a href="Skin.html">Skin</a></li>
            <li><a href="global.html#Object.dontEnum">Object</a></li>
        </ul>
        
    <h3>optional modules</h3>
        <ul>            
            <li><a href="ArrayExtensions.html">Array extensions</a></li>
            <li><a href="DateExtensions.html">Date extensions</a></li>
            <li><a href="NumberExtensions.html">Number extensions</a></li>
            <li><a href="ObjectExtensions.html">Object extensions</a></li>
            <li><a href="StringExtensions.html">String extensions</a></li>
            <li><a href="HopObjectExtensions.html">HopObject extensions</a></li>
            <li><a href="GlobalMacros.html">global macros</a></li>
            <li><a href="MacroFilters.html">macro filters</a></li>
            <li><a href="JSON.html">JSON methods</a></li>
            <br />
            <li><a href="helma.Aspects.html">helma.Aspects</a></li>
            <li><a href="helma.Chart.html">helma.Chart</a></li>
            <li><a href="helma.Color.html">helma.Color</a></li>
            <li><a href="helma.Database.html">helma.Database</a></li>
            <li><a href="helma.File.html">helma.File</a></li>
            <li><a href="helma.Ftp.html">helma.Ftp</a></li>
            <li><a href="helma.Group.html">helma.Group</a></li>
            <li><a href="helma.Html.html">helma.Html</a></li>
            <li><a href="helma.Http.html">helma.Http</a></li>
            <li><a href="helma.Image.html">helma.Image</a></li>
            <li><a href="helma.Mail.html">helma.Mail</a></li>
            <li><a href="helma.Search.html">helma.Search</a></li>
            <li><a href="helma.Skin.html">helma.Skin</a></li>
            <li><a href="helma.Ssh.html">helma.Ssh</a></li>
            <li><a href="helma.Url.html">helma.Url</a></li>
            <li><a href="helma.Zip.html">helma.Zip</a></li>
            <br />
            <li><a href="jala.BitTorrent.html">jala.BitTorrent</a></li>
            <li><a href="jala.Captcha.html">jala.Captcha</a></li>
            <li><a href="jala.Date.html">jala.Date</a></li>
            <li><a href="jala.db.html">jala.db</a></li>
            <li><a href="jala.DnsClient.html">jala.DnsClient</a></li>
            <li><a href="jala.Form.html">jala.Form</a></li>
            <li><a href="jala.History.html">jala.History</a></li>
            <li><a href="jala.HopObjectExtensions.html">jala HopObject extensions</a></li>
            <li><a href="jala.HtmlDocument.html">jala.HtmlDocument</a></li>
            <li><a href="jala.I18n.html">jala.I18n</a></li>
            <li><a href="jala.ImageFilter.html">jala.ImageFilter</a></li>
            <li><a href="jala.IndexManager.html">jala.IndexManager</a></li>
            <li><a href="jala.ListRenderer.html">jala.ListRenderer</a></li>
            <li><a href="jala.Mp3.html">jala.Mp3</a></li>
            <li><a href="jala.PodcastWriter.html">jala.PodcastWriter</a></li>
            <li><a href="jala.RemoteContent.html">jala.RemoteContent</a></li>
            <li><a href="jala.Rss20Writer.html">jala.Rss20Writer</a></li>
            <li><a href="jala.Utilities.html">jala.Utilities</a></li>
            <li><a href="jala.XmlRpcRequest.html">jala.XmlRpcRequest</a></li>
            <li><a href="jala.XmlWriter.html">jala.XmlWriter</a></li>
        </ul>
    
    <h3>java libraries</h3>
        <ul>            
            <li><a href="http://www.docjar.org/">docjar search</a></li>
        </ul>

    <h3>properties files</h3>
        <ul>            
            <li><a href="http://dev.helma.org/docs/Properties+Files/apps.properties/">apps.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/app.properties/">app.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/server.properties/">server.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/db.properties/">db.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Properties+Files/class.properties/">class.properties</a></li>
            <li><a href="http://dev.helma.org/docs/Type.properties+Documentation/">type.properties</a></li>
         </ul>
    
<script> closebox() </script>

</div>
<br clear="all" /><br /><br />



</body>
</html>
